<?php
/**
 * Created by PhpStorm.
 * User: linyida
 * Date: 2019/7/26
 * Time: 上午10:27
 */
namespace App\WebSocket\Actions\Room;
use App\WebSocket\Actions\ActionPayLoad;
use App\WebSocket\WebSocketAction;

/**
 * 消息分发处理
 * Class BroadcastMessage
 * @package App\WebSocket\Actions\Broadcast
 */
class RoomMessage extends  ActionPayLoad {

    protected $action = WebSocketAction::ROOM_MESSAGE;
    protected $fromUserFd;
    protected $content;
    protected $type;
    protected $sendTime;

    /**
     * @return mixed
     */
    public function getFromUserFd() {
        return $this->fromUserFd;
    }

    /**
     * @param $fromUserFd
     */
    public function setFromUserFd($fromUserFd): void {
        $this->fromUserFd = $fromUserFd;
    }

    /**
     * @return mixed
     */
    public function getContent() {
        return $this->content;
    }

    /**
     * @param $content
     */
    public function setContent($content): void {
        $this->content = $content;
    }

    /**
     * @return mixed
     */
    public function getType() {
        return $this->type;
    }

    /**
     * @param string $type image | text,
     */
    public function setType($type): void {
        $this->type = $type;
    }

    /**
     * @param $endTime
     */
    public function setSendTime($endTime): void {
        $this->sendTime = $endTime;
    }

}